org.sadun.util.polling.jboss
Class ManagedDirectoryPollerService

java.lang.Object
  extended byorg.sadun.util.polling.jboss.ManagedDirectoryPollerService
All Implemented Interfaces:
ManagedDirectoryPollerMBean, ManagedDirectoryPollerServiceMBean

public class ManagedDirectoryPollerService
extends java.lang.Object
implements ManagedDirectoryPollerServiceMBean

An extension to the ManagedDirectoryPoller mbean implementation which exposes JBoss' service interface.

Author:
cris

Constructor Summary
ManagedDirectoryPollerService()
          Constructor for ManagedDirectoryPollerService.
ManagedDirectoryPollerService(java.io.File directory)
          Constructor for ManagedDirectoryPollerService.
ManagedDirectoryPollerService(java.io.File[] dirs)
          Constructor for ManagedDirectoryPollerService.
ManagedDirectoryPollerService(java.io.File[] dirs, java.io.FilenameFilter filter)
          Constructor for ManagedDirectoryPollerService.
ManagedDirectoryPollerService(java.io.File[] dirs, java.io.FilenameFilter filter, boolean timeBased)
          Constructor for ManagedDirectoryPollerService.
ManagedDirectoryPollerService(java.io.File directory, java.io.FilenameFilter filter)
          Constructor for ManagedDirectoryPollerService.
ManagedDirectoryPollerService(java.io.File directory, java.io.FilenameFilter filter, boolean timeBased)
          Constructor for ManagedDirectoryPollerService.
ManagedDirectoryPollerService(java.io.FilenameFilter filter)
          Constructor for ManagedDirectoryPollerService.
ManagedDirectoryPollerService(java.io.FilenameFilter filter, boolean timeBased)
          Constructor for ManagedDirectoryPollerService.
 
Method Summary
 void addControlledDirectory(java.lang.String dir)
           
 void addNotificationListener(ObjectName objectName)
           
 void addNotificationListener(java.lang.String mbeanServerName, ObjectName objectName)
           
 int countControlledDirectories()
           
 java.lang.String getAcceptedFilenamePattern()
           
 boolean getAutoMove()
           
 java.lang.String getAutoMoveDirectoryPath(java.lang.String directory)
           
 long getBaseTime(java.lang.String directory)
           
 java.lang.String getControlledDirectories()
           
 java.lang.String getControlledDirectory(int i)
           
 java.lang.String getEventsOrdering()
           
 java.lang.String getFilenameFilterFactory()
           
 java.lang.String getFilenameFilterFactoryClass()
           
 java.lang.String getFilesSortComparatorClass()
           
 java.io.FilenameFilter getFilter()
           
 java.lang.String getJMXSequenceNumberGeneratorClass()
           
 java.lang.String getJMXTimerObjectName()
           
 long getPollInterval()
           
 java.lang.String getPollManagerFactory()
           
 java.lang.String getPollManagerFactoryClass()
           
 void handleNotification(Notification arg0, java.lang.Object arg1)
           
 boolean isBypassLockedFiles()
           
 boolean isDebugExceptions()
           
 boolean isPollingTimeBased()
           
 boolean isRunning()
           
 boolean isSendSingleFileEvent()
           
 boolean isStartBySleeping()
           
 boolean isTimeBased()
           
 boolean isUsingJMXTimer()
           
 boolean isVerbose()
           
 java.lang.String listControlledDirectories()
           
 java.lang.String listInstalledPollManagers()
           
 void postDeregister()
           
 void postRegister(java.lang.Boolean arg0)
           
 void preDeregister()
           
 ObjectName preRegister(MBeanServer server, ObjectName name)
           
 void removeControlledDirectory(java.lang.String dir)
           
 void removeNotificationListener(ObjectName objectName)
           
 void removeNotificationListener(java.lang.String mbeanServerName, ObjectName objectName)
           
 void setAcceptedFilenamePattern(java.lang.String filenamePattern)
           
 void setAutoMove(boolean v)
           
 void setAutoMoveDirectoryPath(java.lang.String directory, java.lang.String automoveDirectory)
           
 void setBaseTime(java.lang.String directory, long time)
           
 void setBypassLockedFiles(boolean supportSlowTransfer)
           
 void setControlledDirectories(java.lang.String commaSeparatedList)
           
 void setDebugExceptions(boolean debugExceptions)
           
 void setEventsOrdering(java.lang.String expr)
           
 void setFilenameFilterFactoryClass(java.lang.String filenameFilterFactoryClsName)
           
 void setFilesSortComparatorClass(java.lang.String fileComparatorClassName)
           
 void setFilter(java.io.FilenameFilter filter)
           
 void setJMXSequenceNumberGeneratorClass(java.lang.String sequenceNumberGeneratorClass)
           
 void setJMXTimerObjectName(java.lang.String jMXTimerObjectName)
           
 void setPollingTimeBased(boolean v)
           
 void setPollInterval(long pollInterval)
           
 void setPollManagerFactoryClass(java.lang.String factoryClass)
           
 void setSendSingleFileEvent(boolean v)
           
 void setStartBySleeping(boolean v)
           
 void setTimeBased(boolean v)
           
 void setUsingJMXTimer(boolean v)
           
 void setVerbose(boolean v)
           
 void shutDown()
           
 void start()
           
 void startUp()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedDirectoryPollerService

public ManagedDirectoryPollerService(java.io.File[] dirs,
                                     java.io.FilenameFilter filter)
Constructor for ManagedDirectoryPollerService.

Parameters:
dirs -
filter -

ManagedDirectoryPollerService

public ManagedDirectoryPollerService(java.io.File[] dirs)
Constructor for ManagedDirectoryPollerService.

Parameters:
dirs -

ManagedDirectoryPollerService

public ManagedDirectoryPollerService(java.io.File directory,
                                     java.io.FilenameFilter filter)
Constructor for ManagedDirectoryPollerService.

Parameters:
directory -
filter -

ManagedDirectoryPollerService

public ManagedDirectoryPollerService(java.io.File directory)
Constructor for ManagedDirectoryPollerService.

Parameters:
directory -

ManagedDirectoryPollerService

public ManagedDirectoryPollerService(java.io.FilenameFilter filter)
Constructor for ManagedDirectoryPollerService.

Parameters:
filter -

ManagedDirectoryPollerService

public ManagedDirectoryPollerService()
Constructor for ManagedDirectoryPollerService.


ManagedDirectoryPollerService

public ManagedDirectoryPollerService(java.io.File[] dirs,
                                     java.io.FilenameFilter filter,
                                     boolean timeBased)
Constructor for ManagedDirectoryPollerService.

Parameters:
dirs -
filter -
timeBased -

ManagedDirectoryPollerService

public ManagedDirectoryPollerService(java.io.File directory,
                                     java.io.FilenameFilter filter,
                                     boolean timeBased)
Constructor for ManagedDirectoryPollerService.

Parameters:
directory -
filter -
timeBased -

ManagedDirectoryPollerService

public ManagedDirectoryPollerService(java.io.FilenameFilter filter,
                                     boolean timeBased)
Constructor for ManagedDirectoryPollerService.

Parameters:
filter -
timeBased -
Method Detail

start

public void start()
Specified by:
start in interface ManagedDirectoryPollerServiceMBean

stop

public void stop()
Specified by:
stop in interface ManagedDirectoryPollerServiceMBean
See Also:
ManagedDirectoryPollerServiceMBean.stop()

addControlledDirectory

public void addControlledDirectory(java.lang.String dir)
                            throws MBeanException
Specified by:
addControlledDirectory in interface ManagedDirectoryPollerMBean
Throws:
MBeanException
See Also:
ManagedDirectoryPollerMBean.addControlledDirectory(java.lang.String)

countControlledDirectories

public int countControlledDirectories()
                               throws MBeanException
Specified by:
countControlledDirectories in interface ManagedDirectoryPollerMBean
Throws:
MBeanException
See Also:
ManagedDirectoryPollerMBean.countControlledDirectories()

getAutoMove

public boolean getAutoMove()
Specified by:
getAutoMove in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.getAutoMove()

getAutoMoveDirectoryPath

public java.lang.String getAutoMoveDirectoryPath(java.lang.String directory)
                                          throws MBeanException
Specified by:
getAutoMoveDirectoryPath in interface ManagedDirectoryPollerMBean
Throws:
MBeanException
See Also:
ManagedDirectoryPollerMBean.getAutoMoveDirectoryPath(java.lang.String)

getBaseTime

public long getBaseTime(java.lang.String directory)
Specified by:
getBaseTime in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.getBaseTime(java.lang.String)

getControlledDirectories

public java.lang.String getControlledDirectories()
Specified by:
getControlledDirectories in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.getControlledDirectories()

getControlledDirectory

public java.lang.String getControlledDirectory(int i)
                                        throws MBeanException
Specified by:
getControlledDirectory in interface ManagedDirectoryPollerMBean
Throws:
MBeanException
See Also:
ManagedDirectoryPollerMBean.getControlledDirectory(int)

getPollInterval

public long getPollInterval()
Specified by:
getPollInterval in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.getPollInterval()

isPollingTimeBased

public boolean isPollingTimeBased()
Specified by:
isPollingTimeBased in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.isPollingTimeBased()

isRunning

public boolean isRunning()
                  throws MBeanException
Specified by:
isRunning in interface ManagedDirectoryPollerMBean
Throws:
MBeanException
See Also:
ManagedDirectoryPollerMBean.isRunning()

isSendSingleFileEvent

public boolean isSendSingleFileEvent()
Specified by:
isSendSingleFileEvent in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.isSendSingleFileEvent()

isStartBySleeping

public boolean isStartBySleeping()
Specified by:
isStartBySleeping in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.isStartBySleeping()

isTimeBased

public boolean isTimeBased()
Specified by:
isTimeBased in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.isTimeBased()

isVerbose

public boolean isVerbose()
Specified by:
isVerbose in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.isVerbose()

listControlledDirectories

public java.lang.String listControlledDirectories()
Specified by:
listControlledDirectories in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.listControlledDirectories()

listInstalledPollManagers

public java.lang.String listInstalledPollManagers()
Specified by:
listInstalledPollManagers in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.listInstalledPollManagers()

removeControlledDirectory

public void removeControlledDirectory(java.lang.String dir)
                               throws MBeanException
Specified by:
removeControlledDirectory in interface ManagedDirectoryPollerMBean
Throws:
MBeanException
See Also:
ManagedDirectoryPollerMBean.removeControlledDirectory(java.lang.String)

setAutoMove

public void setAutoMove(boolean v)
Specified by:
setAutoMove in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.setAutoMove(boolean)

setBaseTime

public void setBaseTime(java.lang.String directory,
                        long time)
Specified by:
setBaseTime in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.setBaseTime(java.lang.String, long)

setControlledDirectories

public void setControlledDirectories(java.lang.String commaSeparatedList)
Specified by:
setControlledDirectories in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.setControlledDirectories(java.lang.String)

setPollingTimeBased

public void setPollingTimeBased(boolean v)
Specified by:
setPollingTimeBased in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.setPollingTimeBased(boolean)

setPollInterval

public void setPollInterval(long pollInterval)
Specified by:
setPollInterval in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.setPollInterval(long)

setSendSingleFileEvent

public void setSendSingleFileEvent(boolean v)
Specified by:
setSendSingleFileEvent in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.setSendSingleFileEvent(boolean)

setStartBySleeping

public void setStartBySleeping(boolean v)
Specified by:
setStartBySleeping in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.setStartBySleeping(boolean)

setVerbose

public void setVerbose(boolean v)
Specified by:
setVerbose in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.setVerbose(boolean)

shutDown

public void shutDown()
              throws MBeanException
Specified by:
shutDown in interface ManagedDirectoryPollerMBean
Throws:
MBeanException
See Also:
ManagedDirectoryPollerMBean.shutDown()

startUp

public void startUp()
             throws MBeanException
Specified by:
startUp in interface ManagedDirectoryPollerMBean
Throws:
MBeanException
See Also:
ManagedDirectoryPollerMBean.startUp()

getPollManagerFactoryClass

public java.lang.String getPollManagerFactoryClass()
Specified by:
getPollManagerFactoryClass in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.getPollManagerFactory()

setPollManagerFactoryClass

public void setPollManagerFactoryClass(java.lang.String factoryClass)
                                throws java.lang.IllegalAccessException,
                                       java.lang.InstantiationException,
                                       java.lang.ClassNotFoundException
Specified by:
setPollManagerFactoryClass in interface ManagedDirectoryPollerMBean
Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.ClassNotFoundException
See Also:
ManagedDirectoryPollerMBean.setPollManagerFactoryClass(java.lang.String)

getPollManagerFactory

public java.lang.String getPollManagerFactory()
Specified by:
getPollManagerFactory in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.getPollManagerFactory()

getJMXTimerObjectName

public java.lang.String getJMXTimerObjectName()
Specified by:
getJMXTimerObjectName in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.getJMXTimerObjectName()

isUsingJMXTimer

public boolean isUsingJMXTimer()
Specified by:
isUsingJMXTimer in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.isUsingJMXTimer()

setJMXTimerObjectName

public void setJMXTimerObjectName(java.lang.String jMXTimerObjectName)
Specified by:
setJMXTimerObjectName in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.setJMXTimerObjectName(java.lang.String)

setUsingJMXTimer

public void setUsingJMXTimer(boolean v)
Specified by:
setUsingJMXTimer in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.setUsingJMXTimer(boolean)

getFilter

public java.io.FilenameFilter getFilter()
Specified by:
getFilter in interface ManagedDirectoryPollerMBean
See Also:
ManagedDirectoryPollerMBean.getFilter()

setFilter

public void setFilter(java.io.FilenameFilter filter)
See Also:
org.sadun.util.polling.ManagedDirectoryPollerMBean#setFilter(java.io.FilenameFilter)

postDeregister

public void postDeregister()
See Also:
javax.management.MBeanRegistration#postDeregister()

postRegister

public void postRegister(java.lang.Boolean arg0)
See Also:
javax.management.MBeanRegistration#postRegister(Boolean)

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
javax.management.MBeanRegistration#preDeregister()

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
javax.management.MBeanRegistration#preRegister(MBeanServer, ObjectName)

handleNotification

public void handleNotification(Notification arg0,
                               java.lang.Object arg1)
See Also:
javax.management.NotificationListener#handleNotification(Notification, Object)

setFilenameFilterFactoryClass

public void setFilenameFilterFactoryClass(java.lang.String filenameFilterFactoryClsName)
                                   throws java.lang.InstantiationException,
                                          java.lang.IllegalAccessException,
                                          java.lang.ClassNotFoundException
Specified by:
setFilenameFilterFactoryClass in interface ManagedDirectoryPollerMBean
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException

getFilenameFilterFactory

public java.lang.String getFilenameFilterFactory()
Specified by:
getFilenameFilterFactory in interface ManagedDirectoryPollerMBean

getFilenameFilterFactoryClass

public java.lang.String getFilenameFilterFactoryClass()
Specified by:
getFilenameFilterFactoryClass in interface ManagedDirectoryPollerMBean

getAcceptedFilenamePattern

public java.lang.String getAcceptedFilenamePattern()
Specified by:
getAcceptedFilenamePattern in interface ManagedDirectoryPollerMBean

setAcceptedFilenamePattern

public void setAcceptedFilenamePattern(java.lang.String filenamePattern)
Specified by:
setAcceptedFilenamePattern in interface ManagedDirectoryPollerMBean

setAutoMoveDirectoryPath

public void setAutoMoveDirectoryPath(java.lang.String directory,
                                     java.lang.String automoveDirectory)
Specified by:
setAutoMoveDirectoryPath in interface ManagedDirectoryPollerMBean

getFilesSortComparatorClass

public java.lang.String getFilesSortComparatorClass()
Specified by:
getFilesSortComparatorClass in interface ManagedDirectoryPollerMBean

setFilesSortComparatorClass

public void setFilesSortComparatorClass(java.lang.String fileComparatorClassName)
                                 throws java.lang.InstantiationException,
                                        java.lang.IllegalAccessException,
                                        java.lang.ClassNotFoundException
Specified by:
setFilesSortComparatorClass in interface ManagedDirectoryPollerMBean
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException

getEventsOrdering

public java.lang.String getEventsOrdering()
Specified by:
getEventsOrdering in interface ManagedDirectoryPollerMBean

setEventsOrdering

public void setEventsOrdering(java.lang.String expr)
Specified by:
setEventsOrdering in interface ManagedDirectoryPollerMBean

getJMXSequenceNumberGeneratorClass

public java.lang.String getJMXSequenceNumberGeneratorClass()
Specified by:
getJMXSequenceNumberGeneratorClass in interface ManagedDirectoryPollerMBean

setJMXSequenceNumberGeneratorClass

public void setJMXSequenceNumberGeneratorClass(java.lang.String sequenceNumberGeneratorClass)
                                        throws MBeanException
Specified by:
setJMXSequenceNumberGeneratorClass in interface ManagedDirectoryPollerMBean
Throws:
MBeanException

addNotificationListener

public void addNotificationListener(ObjectName objectName)
                             throws InstanceNotFoundException
Specified by:
addNotificationListener in interface ManagedDirectoryPollerMBean
Throws:
InstanceNotFoundException

addNotificationListener

public void addNotificationListener(java.lang.String mbeanServerName,
                                    ObjectName objectName)
                             throws InstanceNotFoundException
Specified by:
addNotificationListener in interface ManagedDirectoryPollerMBean
Throws:
InstanceNotFoundException

removeNotificationListener

public void removeNotificationListener(ObjectName objectName)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Specified by:
removeNotificationListener in interface ManagedDirectoryPollerMBean
Throws:
InstanceNotFoundException
ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(java.lang.String mbeanServerName,
                                       ObjectName objectName)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Specified by:
removeNotificationListener in interface ManagedDirectoryPollerMBean
Throws:
InstanceNotFoundException
ListenerNotFoundException

isBypassLockedFiles

public boolean isBypassLockedFiles()
Specified by:
isBypassLockedFiles in interface ManagedDirectoryPollerMBean

setBypassLockedFiles

public void setBypassLockedFiles(boolean supportSlowTransfer)
Specified by:
setBypassLockedFiles in interface ManagedDirectoryPollerMBean

isDebugExceptions

public boolean isDebugExceptions()
Specified by:
isDebugExceptions in interface ManagedDirectoryPollerMBean

setDebugExceptions

public void setDebugExceptions(boolean debugExceptions)
Specified by:
setDebugExceptions in interface ManagedDirectoryPollerMBean

setTimeBased

public void setTimeBased(boolean v)
Specified by:
setTimeBased in interface ManagedDirectoryPollerMBean


Copyright © 1999, 2000 Cristiano Sadun. This software is released under GPL.